package com.spring.util;

/**
 * @ 类名称：MovieFinder
 * @ 类描述：
 * @ 创建人：Jesse zhu
 * @ 修改人：
 * @ 修改时间：2020-06-04  13:41
 * @ 修改备注：
 * @ version：0.1
 */
public class SingletonTest {
    private static  volatile SingletonTest movieFinder = null;
    private SingletonTest(){

        System.out.println("Thread name :"+Thread.currentThread().getName()+" MovieFinder created!");
    }
    public static SingletonTest getInstance(){
        if(movieFinder==null){
            synchronized(SingletonTest.class){
                if(movieFinder==null){
                    movieFinder = new SingletonTest();
                }
            }
        }
        return movieFinder;
    }

}
